let costId = window.localStorage.getItem("costId");
let costName = window.localStorage.getItem('costName');
let baseDuration = window.localStorage.getItem('baseDuration');
let baseCost = window.localStorage.getItem('baseCost');
let unitCost = window.localStorage.getItem('unitCost');
let creatime = window.localStorage.getItem('creatime');
let startime = window.localStorage.getItem('startime');
let costStatus = window.localStorage.getItem('costStatus');
let costType = window.localStorage.getItem('costType');
let descr = window.localStorage.getItem('descr');



$(() => {

// 资费id
    $('#costId').val(costId);
// 资费名称
    $('#costName').val(costName);
// 资费类型
    switch (costType) {
        case 'm':
            $('#monthly').attr("checked", "checked");
            break;
        case 'c':
            $('#package').attr("checked", "checked");
            break;
        case 't':
            $('#timeBased').attr("checked", "checked");
            break;
    }

// 资费状态
    console.log(costStatus);
    switch (costStatus) {
        case '开通':
            $('#running').attr("selected", "selected");
            break;
        case '暂停':
            $('#pausing').attr("selected", "selected");
            break;
        case '删除':
            $('#deleted').attr("selected", "selected");
            break;
    }


// 创建时间
    $('#creatime').val(creatime);
// 启动时间
    $('#startime').val(startime);


// 基本时长
    baseDuration = baseDuration === '-' ? "" : baseDuration;
    $('#baseDuration').val(baseDuration);
// 基本费用
    baseCost = baseCost === '-' ? "" : baseCost;
    $('#baseCost').val(baseCost);
// 单位费用
    unitCost = unitCost === '-' ? "" : unitCost;
    $('#unitCost').val(unitCost);
// 资费说明
    $('#descr').text(descr);



});